import {
  mapGetters
} from "vuex"

export default {
  computed: {
    ...mapGetters("m_cart", ['total']),
  },
  onShow() {
    this.setBadge()
  },
  methods: {
    // 数字徽标
    setBadge() {
      uni.setTabBarBadge({
        index: 2,
        text: `${this.total}`
      })
    }
  }
}